package router

import (
	"api-gateway/handler/service"
	"github.com/gin-gonic/gin"
)

func Router() *gin.Engine {
	r := gin.Default()
	r.POST("/ossUpload", service.OssUpload)
	r.POST("/publishVideo", service.PublishVideo)
	r.POST("/checkVideo", service.CheckVideo)
	r.GET("/getVideoListById", service.GetVideoListById)
	r.GET("/getVideoList", service.GetVideoList)
	r.GET("/getEpisodeById", service.GetEpisodeById)
	r.GET("/getEpisodeList", service.GetEpisodeList)
	r.GET("/lookVideo", service.LookVideo)
	r.GET("/getEpisodeLogList", service.GetEpisodeLogList)
	r.POST("/lookEpisode", service.LookEpisode)
	r.POST("/addFavorite", service.AddFavorite)
	r.GET("/esSearchVideoList", service.EsSearchVideoList)
	r.GET("/getMemberList", service.GetMemberList)
	r.POST("/payMember", service.PayMember)
	r.POST("/aliPayCallback", service.AliPayCallback)
	r.GET("/getUserMember", service.GetUserMember)
	r.POST("/addDanMu", service.AddDanMu)
	r.GET("/getDanMu", service.GetDanMu)
	r.POST("/addComment", service.AddComment)
	r.GET("/getCommentList", service.GetCommentList)
	r.POST("/sendSms", service.SendSms)
	r.POST("/register", service.Register)
	r.POST("/login", service.Login)
	return r
}
